package com.pd.algo.string;

public class Palindrom {

	public static void main(String[] args) {

		String inputString = "";
		boolean isPalindrom = isPalindrom(inputString);
		System.out.println(isPalindrom ? "Input string is palindrom." : "Input String is not a palidrom.");

	}

	private static boolean isPalindrom(String inputString) {

		int length = inputString.length();

		for (int i = 0; i < length / 2; i++) {
			if (inputString.charAt(i) != inputString.charAt(length - 1 - i)) {
				return false;
			}
		}
		return true;
	}

}
